﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LinqToTwitter;
using System.Configuration;
using System.Threading;
using Twitter.Util;

namespace Twitter
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Util.Authentification authen = new Util.Authentification();
            Boolean b = authen.isAuthentificated(Request, Response);

            if (!b)
                authen.auth.BeginAuthorization(Request.Url);
            else
            {
                Session["auth"] = authen.auth;
                Response.Redirect("Index.aspx");
            }
        }

    }
}